import java.util.List;

import static java.util.Collections.shuffle;

/**
 * Created with IntelliJ IDEA.
 * Description:洗牌算法
 * User: liangyuanzhang
 * Date: 2025-3-15
 * Time: 16:18
 */
public class Test {
    public static void main(String[] args) {
        CarDemo carDemo = new CarDemo();
        //1. 买52z张牌
        List<Card> cardList = carDemo.buyCard();
        System.out.println("未洗牌:");
        System.out.println(cardList);
        //2. 洗牌
        carDemo.shuffle(cardList);
        System.out.println("洗牌后:");
        System.out.println(cardList);
        //3. 3个人 每个人 轮流揭牌5张
        List<List<Card>> ret = carDemo.play(cardList);

        for (int i = 0; i < ret.size(); i++) {
            System.out.println("第"+(i+1)+"个人的牌:"+ret.get(i));
        }
        System.out.println("剩下的牌:");
        System.out.println(cardList);
    }
}
